package cn.itcast.wanxinp2p.common.exception;

import cn.itcast.wanxinp2p.common.domain.ErrorCode;

public class TccTryException  extends RuntimeException{
    private static final long serialVersionUID = 5565760508056698923L;

    //引入异常编码类

    private ErrorCode errorCode;

    public TccTryException(ErrorCode errorCode) {
        this.errorCode = errorCode;
    }

    public TccTryException(String message, ErrorCode errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

    public TccTryException(String message, Throwable cause, ErrorCode errorCode) {
        super(message, cause);
        this.errorCode = errorCode;
    }

    public TccTryException(Throwable cause, ErrorCode errorCode) {
        super(cause);
        this.errorCode = errorCode;
    }

    public TccTryException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, ErrorCode errorCode) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.errorCode = errorCode;
    }

    public TccTryException() {
    }

    public TccTryException(String message) {
        super(message);
    }

    public TccTryException(String message, Throwable cause) {
        super(message, cause);
    }

    public TccTryException(Throwable cause) {
        super(cause);
    }

    public TccTryException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(ErrorCode errorCode) {
        this.errorCode = errorCode;
    }


}
